// {
//   "total": 3,
//   "items": [
//     {
//       "id": "string",
//       "gmtCreate": "2022-11-30 20:58:42",
//       "gmtModified": "2022-11-30 20:58:42",
//       "deleted": false,
//       "username": "8585",
//       "password": "ed556265816011ba76a53e5cf54450cf",
//       "nickName": "888",
//       "salt": "string",
//       "token": "string",
//       "roleName": "平台管理员,品牌管理员,测试2"
//     },
//   ]
// }

export interface AdminUserListParams {
  page: number;
  limit: number;
  username: string;
}

export interface UserItems {
  id: string;
  gmtCreate: string;
  gmtModified: string;
  // deleted: boolean;
  username: string;
  // password: string;
  nickName: string;
  // salt: string;
  // token: string;
  roleName: string;
}

export type UserItemsList = UserItems[];

export interface UserItem {
  total: number;
  items: UserItemsList;
}

export type UserList = UserItem;

export interface AddAdminUserParams
  extends Pick<UserItems, "username" | "nickName"> {
  password: string;
}

export interface UpdateAdminUserParams extends AddAdminUserParams {
  id: string;
}

export interface AddOrUpdateAdminUserFormData extends AddAdminUserParams {
  id?: string;
}

export interface RoleItem {
  id: string;
  gmtCreate: string;
  gmtModified: string;
  roleName: string;
  // remark: null;
  // deleted: false;
}

export type RoleList = RoleItem[];

export interface GetUserRoleListApiResponse {
  allRolesList: RoleList;
  assignRoles: RoleList;
}
